package com.liyy.platform;

import com.liyy.platform.other.listener_event.event.MyEvent;
import com.liyy.platform.other.listener_event.listener.MyListener1;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

@SpringBootApplication
public class BaseApplication {

	public static void main(String[] args) {
		ConfigurableApplicationContext context = SpringApplication.run(BaseApplication.class, args);
		//装载事件
		context.addApplicationListener(new MyListener1());
		//发布事件
		context.publishEvent(new MyEvent("测试事件."));
	}
}
